package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class JobRequirements {
    /**
     * 工作条件编号
     */
    private int jrId;
    /**
     * 职位编号
     */
    private int jiId;
    /**
     * 最低年龄
     */
    private int ageMin;
    /**
     * 最高年龄
     */
    private int ageMax;
    /**
     * 性别
     */
    private String sex;
    /**
     * 学历要求
     */
    private String education;
    /**
     * 最低身高
     */
    private int heightMin;
    /**
     * 最高身高
     */
    private int heightMax;
    /**
     * 是否需要健康证
     */
    private int healthCert;
    /**
     * 其他特殊要求
     */
    private String otherReq;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public JobRequirements() {}
    public JobRequirements(int jrId, int jiId, int ageMin, int ageMax, String sex, String education, int heightMin, int heightMax, int healthCert, String otherReq, Date createTime, int state) {
        this.jrId = jrId;
        this.jiId = jiId;
        this.ageMin = ageMin;
        this.ageMax = ageMax;
        this.sex = sex;
        this.education = education;
        this.heightMin = heightMin;
        this.heightMax = heightMax;
        this.healthCert = healthCert;
        this.otherReq = otherReq;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("jrId","jr_id");
        map.put("jiId","ji_id");
        map.put("ageMin","age_min");
        map.put("ageMax","age_max");
        map.put("sex","sex");
        map.put("heightMin","height_min");
        map.put("education","education");
        map.put("heightMax","height_max");
        map.put("healthCert","health_cert");
        map.put("otherReq","other_req");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getJrId() {
        return jrId;
    }

    public void setJrId(int jrId) {
        this.jrId = jrId;
    }

    public int getJiId() {
        return jiId;
    }

    public void setJiId(int jiId) {
        this.jiId = jiId;
    }

    public int getAgeMin() {
        return ageMin;
    }

    public void setAgeMin(int ageMin) {
        this.ageMin = ageMin;
    }

    public int getAgeMax() {
        return ageMax;
    }

    public void setAgeMax(int ageMax) {
        this.ageMax = ageMax;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public int getHeightMin() {
        return heightMin;
    }

    public void setHeightMin(int heightMin) {
        this.heightMin = heightMin;
    }

    public int getHeightMax() {
        return heightMax;
    }

    public void setHeightMax(int heightMax) {
        this.heightMax = heightMax;
    }

    public int getHealthCert() {
        return healthCert;
    }

    public void setHealthCert(int healthCert) {
        this.healthCert = healthCert;
    }

    public String getOtherReq() {
        return otherReq;
    }

    public void setOtherReq(String otherReq) {
        this.otherReq = otherReq;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印工作条件表
     * @return
     */
    @Override
    public String toString() {
        return "JobRequirements{" +
                "jrId=" + jrId +
                ", jiId=" + jiId +
                ", ageMin=" + ageMin +
                ", ageMax=" + ageMax +
                ", sex='" + sex + '\'' +
                ", education='" + education + '\'' +
                ", heightMin=" + heightMin +
                ", heightMax=" + heightMax +
                ", healthCert=" + healthCert +
                ", otherReq='" + otherReq + '\'' +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
